home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 2 / ETO Development Tools 2.iso / Essentials / Developer Essentials Nov 90 / Apple II / Programming & Utilities / MPW IIgs Interfaces / PIIGSIncludes / Fonts.p < prev    next >
Encoding:
Text File  |  1990-04-03  |  3.5 KB  |  106 lines  |  [TEXT/MPS ]

  1. {********************************************
  2. ; File: Fonts.p
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc. 1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************}
  9.  
  10. UNIT FONTS;
  11. INTERFACE
  12. USES TYPES,QUICKDRAW;
  13. CONST
  14.  
  15. { Error Codes }
  16. fmDupStartUpErr = $1B01;  { duplicate FMStartUp call }
  17. fmResetErr = $1B02;  { can't reset the Font Manager }
  18. fmNotActiveErr = $1B03;  { Font Manager not active }
  19. fmFamNotFndErr = $1B04;  { family not found }
  20. fmFontNtFndErr = $1B05;  { font not found }
  21. fmFontMemErr = $1B06;  { font not in memory }
  22. fmSysFontErr = $1B07;  { system font cannot be purgeable }
  23. fmBadFamNumErr = $1B08;  { illegal family number }
  24. fmBadSizeErr = $1B09;  { illegal size }
  25. fmBadNameErr = $1B0A;  { illegal name length }
  26. fmMenuErr = $1B0B;  { fix font menu never called }
  27. fmScaleSizeErr = $1B0C;  { scaled size of font exeeds limits }
  28.  
  29. { Font Family Numbers }
  30. chicago = $FFFD;
  31. shaston = $FFFE;
  32. systemFont0 = $0000;
  33. systemFont1 = $0001;
  34. newYork = $0002;
  35. geneva = $0003;
  36. monaco = $0004;
  37. venice = $0005;
  38. london = $0006;
  39. athens = $0007;
  40. sanFrancisco = $0008;
  41. toronto = $0009;
  42. cairo = $000B;
  43. losAngeles = $000C;
  44. zapfDingbats = $000D;
  45. bookman = $000E;
  46. helveticaNarrow = $000F;
  47. palatino = $0010;
  48. zapfChancery = $0012;
  49. times = $0014;
  50. helvetica = $0015;
  51. courier = $0016;
  52. symbol = $0017;
  53. taliesin = $0018;
  54. avanteGarde = $0021;
  55. newCenturySchoolbook = $0022;
  56. baseOnlyBit = $0020;  { FamSpecBits }
  57. notBaseBit = $0020;  { FamStatBits }
  58. memOnlyBit = $0001;  { FontSpecBits }
  59. realOnlyBit = $0002;  { FontSpecBits }
  60. anyFamBit = $0004;  { FontSpecBits }
  61. anyStyleBit = $0008;  { FontSpecBits }
  62. anySizeBit = $0010;  { FontSpecBits }
  63. memBit = $0001;  { FontStatBits }
  64. unrealBit = $0002;  { FontStatBits }
  65. apFamBit = $0004;  { FontStatBits }
  66. apVarBit = $0008;  { FontStatBits }
  67. purgeBit = $0010;  { FontStatBits }
  68. notDiskBit = $0020;  { FontStatBits }
  69. notFoundBit = $8000;  { FontStatBits }
  70. dontScaleBit = $0001;  { Scale Word }
  71. TYPE
  72. FontStatRecHndl = ^FontStatRecPtr;
  73. FontStatRecPtr = ^FontStatRec;
  74. FontStatRec = RECORD
  75.     resultID : FontID;
  76.     resultStats : Integer;
  77. END;
  78. PROCEDURE AddFamily ( famNum:Integer; famName:Str255)  ;
  79. PROCEDURE AddFontVar ( fontHandle:FontHndl; newSpecs:Integer)  ;
  80. FUNCTION ChooseFont ( currentID:FontID; famSpecs:Integer) : FontID ;
  81. FUNCTION CountFamilies ( famSpecs:Integer) : Integer ;
  82. FUNCTION CountFonts ( desiredID:FontId; fontSpecs:Integer) : Integer ;
  83. FUNCTION FamNum2ItemID ( famNum:Integer) : Integer ;
  84. FUNCTION FindFamily ( famSpecs:Integer; positionNum:Integer; famName:Str255) : Integer ;
  85. PROCEDURE FindFontStats ( desiredID:FontId; fontSpecs:Integer; positionNum:Integer;VAR resultPtr:FontStatRec)  ;
  86. PROCEDURE FixFontMenu ( menuID:Integer; startingID:Integer; famSpecs:Integer)  ;
  87. PROCEDURE FMBootInit   ;
  88. FUNCTION FMGetCurFID  : FontID ;
  89. FUNCTION FMGetSysFID  : FontID ;
  90. PROCEDURE FMReset   ;
  91. PROCEDURE FMSetSysFont ( newFontID:FontID)  ;
  92. PROCEDURE FMShutDown   ;
  93. PROCEDURE FMStartUp ( userID:Integer; dPageAddr:Integer)  ;
  94. FUNCTION FMStatus  : Boolean ;
  95. FUNCTION FMVersion  : Integer ;
  96. FUNCTION GetFamInfo ( famNum:Integer; famName:Str255) : Integer ;
  97. FUNCTION GetFamNum ( famName:Str255) : Integer ;
  98. PROCEDURE InstallFont ( desiredID:FontID; scaleWord:Integer)  ;
  99. PROCEDURE InstallWithStats ( desiredID:FontID; scaleWord:Integer;VAR resultPtr:FontStatRec)  ;
  100. FUNCTION ItemID2FamNum ( itemID:Integer) : Integer ;
  101. PROCEDURE LoadFont ( desiredID:FontID; fontSpecs:Integer; positionNum:Integer;VAR resultPtr:FontStatRec)  ;
  102. PROCEDURE LoadSysFont   ;
  103. PROCEDURE SetPurgeStat ( theFontID:FontID; purgeStat:Integer)  ;
  104. IMPLEMENTATION
  105. END.
  106.